import React from "react";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import { Label } from "@/components/ui/label";

const OptionsRadioGroup = ({ options, onChange, value }) => {
  return (
    <RadioGroup onValueChange={onChange} className="flex gap-x-5" value={value}>
      {options.map((option) => (
        <div className="flex items-center space-x-2" key={option.value}>
          <RadioGroupItem value={option.value} id={option.value} />
          <Label htmlFor={option.value}>{option.label}</Label>
        </div>
      ))}
    </RadioGroup>
  );
};

export default OptionsRadioGroup;
